﻿using Shop.Collect;
using WeDonekRpc.Client.Attr;
using WeDonekRpc.Client.Interface;

namespace Shop.LocalEvent.LTemplate
{
    [LocalEventName("Delete")]
    internal class ClearLConfig : IEventHandler<LogisticsTemplateEvent>
    {
        private readonly ILogisticsConfigCollect _LConfig;

        public ClearLConfig (ILogisticsConfigCollect template)
        {
            this._LConfig = template;
        }

        public void HandleEvent (LogisticsTemplateEvent data, string eventName)
        {
            this._LConfig.Clear(data.Template.Id);
        }
    }
}
